#include "UdtSkinObjectEnginer.h"
#include "SkinWindowBase.h"
#include "SkinFrame.h"
#include "SkinButton.h"
#include "SkinContainerWnd.h"
#include "SkinImageGdiplus.h"

CUdtSkinObjectEnginer* CUdtSkinObjectEnginer::m_pUdtEnginer = NULL;
CUdtSkinObjectEnginer::CUdtSkinObjectEnginer( void )
{
}

CUdtSkinObjectEnginer::~CUdtSkinObjectEnginer( void )
{
}

CSkinWindowBase* CUdtSkinObjectEnginer::CreateUdtSkinObject( LPCTSTR lpszClassName )
{
    CSkinWindowBase* pWndBase = NULL;

    if ( 0 == _tcscmp( lpszClassName, _T( "MainFrame" ) ) )
    {
//        pWndBase= new CSkinFrame();
    }
    else if ( 0 == _tcscmp( lpszClassName, _T( "Button" ) ) )
    {
        pWndBase = new CSkinButton();
    }
    else if ( 0 == _tcscmp( lpszClassName, _T( "div" ) ) )
    {
        pWndBase = new CSkinDiv();
    }
    else if ( 0 == _tcscmp( lpszClassName, _T( "Image" ) ) )
    {
        pWndBase = new CSkinImageGdiplus;
    }

    return pWndBase;
}

CUdtSkinObjectEnginer* CUdtSkinObjectEnginer::GetHinstance()
{
    if ( NULL == m_pUdtEnginer )
    {
        m_pUdtEnginer = new CUdtSkinObjectEnginer();
    }

    return m_pUdtEnginer;
}